-
Notifications
You must be signed in to change notification settings - Fork 12k
proxy-config documentation #1896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
CLAs look good, thanks! |
I think it is worth mentioning that proxy confguration would support all the configuration mentioned at https://webpack.github.io/docs/webpack-dev-server.html#proxy except support for functions in configuration. Good work @leon |
@mmrath I've added the link :) |
The config file in these instructions actually didn't work for me. What did work for me was something slightly different: {
"/api": {
"target": "http://localhost:3000",
"secure": "false"
}
} ( |
@jasonswett We can change it to |
Thanks for getting this doc out there! Helped me out big time. |
Thanks for documenting this feature, we'll merge this soon! |
We do this by passing a file to `--proxy-config` | ||
|
||
Say we have a server running on `http://localhost:3000/api` and we want all calls th `http://localhost:4200/api` to go to that server. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
th
= to
.
Thanks for the documentation!
Any idea on how to have different targets per environment? |
@gus4no you could have different NPM tasks which call not an automated solution, but something... |
Always nothing about --proxy option in official documentation ? |
@maximelafarie it's in the wiki now: https://github.com/angular/angular-cli/wiki/stories-proxy |
It could seems silly but a note/remind like "After every edit to proxy.config.json a restart of npm process is needed to apply them" could save some time in late hour working! 😄 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
documentation on how to use
--proxy-config